<template>
  <div>
    <van-nav-bar title="设置密码" right-text="跳过" @click-right="next" />
    <van-form @submit="setPass" style="margin-top:30px;">
      <van-field
        class="formInput"
        v-model="queryInfo.password"
        type="password"
        name="密码"
        placeholder="请设置登录密码"
        :rules="[{ required: true, message: '请填写密码' }]"
      />
      <van-field
        class="formInput"
        v-model="queryInfo.passwordA"
        type="password"
        name="密码"
        placeholder="请再次设置密码"
        :rules="[{ required: true, message: '请填写密码' }]"
      />
      <div style="margin: 16px;">
        <van-button
          style="margin-top:60px"
          round
          block
          type="info"
          native-type="submit"
          color="linear-gradient(to right, #ff6034, #ee0a24)"
        >提交</van-button>
      </div>
    </van-form>
  </div>
</template>

<script>
export default {
  // 组件名称
  name: "demo", // 组件参数 接收来自父组件的数据
  props: [],
  components: {},
  data() {
    return {
        queryInfo:{
            mobile:'',
            password:'',
            passwordA:'',
        }
    };
  },
  computed: {},
  watch: {},
  methods: {
    next() {
      console.log(next);
    },
    setPass(){
        if( this.queryInfo.password !== this.queryInfo.passwordA ){
            return this.$notify({ type: 'danger', message: '两次输入密码不同' })
        }else{
            
        }
    }
  },
  beforeCreate() {},
  created() {},
  beforeMount() {},
  mounted() {}
};
</script> 
<style scoped>
</style>
